# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=smplxmpp
pkgver=0.9.3
pkgrel=1
pkgdesc="Simple XMPP command line client"
url="https://codeberg.org/tropf/smplxmpp"
arch="all"
license="GPL-3.0-or-later"
makedepends="
	argp-standalone
	cmake
	gloox-dev
	gnutls-dev
	libidn-dev
	samurai
	spdlog-dev
	zlib-dev
	"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://codeberg.org/tropf/smplxmpp/archive/v$pkgver.tar.gz
	argp.patch
	fmt10.patch
	"
builddir="$srcdir/$pkgname"
options="!check" # checks require an xmpp server

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
cafbdb164fe6ab1b75bfd2d8244a3a8785b44e7bc6b1c88d0db941d1e04a9f067bd10f0539245efec61fbf74ef057349d27c451f19acd8fbba5ad10a73aaf45d  smplxmpp-0.9.3.tar.gz
df1abad52e9845712dd4f3fbd8f333e73e46c5a3bc0721364d9672a865bf605ede946d7853c5051549f20d26611bd6383557243334cdee9c382fd0325d96102b  argp.patch
35f016dcc53dd0a6abcfaf332907b8f54b9cd21b5ecdfa4ee7740a724c9ada80a58a0fae9b342637332df2c8b2c58168d82e9ccd1d9c03e30ae8271043e75b7c  fmt10.patch
"
